<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>测试一下</title>

		<link rel="stylesheet" type="text/css" href="canvasCee.css" />
		<script type="text/javascript" src="canvasJS.js"></script>
	</head>

	<body>

		<p>要使用的图像：</p>
		<img id="tulip" src="https://ws1.sinaimg.cn/large/c808130agy1fmtxocyn4uj21400zkq7x.jpg" alt="The Tulip" onload="resample_single(document.getElementById('myCanvas'), 400,400, true)" />

		<p>画布：</p>

		<div id="myDiv">
			<canvas id="myCanvas">
			您的浏览器不支持HTML5 canvas标记
		</canvas>

		</div>

		<p>sadfgsdfgsdgfsdfgsd</p>

		<script>
			var str = "fsd时代峰峻考试大纲和三大机构阿萨德和公开了三大刚好看见了第三个还是点击考虑过的谁看过色导航可根据了的谁看过电视剧看过多少个加快速度很干净肯定是恒哥可视对讲刚开始的";

			var res = [];
			for(var i = 0; i < str.length; i++)
				res[i] = ("00" + str.charCodeAt(i).toString(16)).slice(-4);

			var fdd = "\\u" + res.join("\\u");
			console.log(fdd)

			var tempStr = fdd.replace(/\\/g, "%");
			console.log(tempStr)
		</script>

	</body>

</html>